/*
 * $Id$
 */

package corejs.expr;

import corejs.rt.ActivationRecord;
import corejs.rt.Value;
import corejs.util.XmlPrinter;

/**
 *
 * @author pengyu
 */
public class ConditionalExpr implements Expression {

   private Expression _test;
   private Expression _then;
   private Expression _els;

   public ConditionalExpr(final Expression test, final Expression then,
                          final Expression els) {
      _test = test;
      _then = then;
      _els = els;
   }

   @Override
   public void print(XmlPrinter printer) {
      throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
   }

   @Override
   public Object eval(ActivationRecord scope) {
      throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
   }

   @Override
   public Value accept(final ExpressionVisitor visitor) {
      return visitor.visitConditionExpr(_test, _then, _els);
   }
}
